package com.qfedu.service.impl;

import com.qfedu.entity.Category;
import com.qfedu.mapper.CategoryMapper;
import com.qfedu.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryMapper categoryMapper;

    @Transactional
    @Override
    public List<Category> getCategoryList() {
        return categoryMapper.getCategoryList();
    }

    @Transactional
    @Override
    public Category getCategoryByCategoryId(Integer categoryId) {
        return categoryMapper.getCategoryByCategoryId(categoryId);
    }
}
